
package model.persistence;

import java.sql.Connection;

public abstract class AbstractDAO implements DAO{

    private Connection connection;

    public Connection setConnection(Connection connection){
        if(connection == null)
            throw new IllegalArgumentException("Conexão nula.");

        this.connection = connection;

        return this.connection;
    }

    public Connection getConnection(){
        return this.connection;
    }

    public Object clone() throws CloneNotSupportedException{
        return super.clone();
    }
}
